
#include "cstring.h"

int main() {

    string s1 ="//SZ#300189.txt";
    string s2= "OK";
    string s3="no";

    cout << str::toupper(s1) <<",";
    cout << str::tolower(s2) << ",";
    cout << str::len(s1) <<",";
    cout << endl;

    cout << str::right(s1,4,6) <<endl;

    cout << str::left(s1,0,6) <<endl;

    cout << str::reverse(s1)<<endl;

    cout << str::replace(s1,'S',"SH")<<endl;
    cout << str::replace(s1,"SZ","BJ")<<endl;

    cout << str::replace("2022/04/06",'/',"-")<<endl;

    cout <<str::to_str(1233) <<endl;
    string s="AB,BC,CD,DE";
    string* ss =new string[4];

    str::str_to_array(s,',',ss);
    cout <<ss[1] <<endl;
    delete[] ss;

    cout << str::getdate() <<","<< str::gettime()  <<endl;
    cout << str::now() <<endl;

    cout << str::getSubString(s1,1,10) <<endl;

    vector <string> v1 =file::readfile_to_vector("D:\\new_tdx\\T0002\\export\\SZ#300341.txt");
    cout << v1[0]<<endl;

    StockD fdata;
    vector <StockD> v2 =file::readfile_to_vector("D:\\new_tdx\\vipdoc\\sh\\lday\\sh000001.day",fdata);
    cout << v2[v2.size()-1].stock_date<<endl;

    return 0;
}
